Page({
  data: {
    repairList: []
  },
  onShow () {
    this.getRepairList()
  },
  // 获取报修信息列表
  async getRepairList () {
    const res = await wx.$http.get('/repair')
    // console.log(res)
    if (res.code !== 10000) return wx.$utils.toast()
    this.setData({
      repairList: res.data.rows
    })
  },
  goDetail (e) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + e.mark.id
    })
  },
  addRepair () {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index'
    })
  }
})
